//创建store和引入中间件
import { legacy_createStore, applyMiddleware } from 'redux'
import { rootReducer } from './reducers' //导入合并后的reducer
import thunk from 'redux-thunk' //异步
import { composeWithDevTools } from 'redux-devtools-extension' //调试redux里定义的数据

//创建store方法导入合并后的reducer
const store = legacy_createStore(
  rootReducer,
  composeWithDevTools(applyMiddleware(thunk))
)

export default store
